#include<stdio.h>
#include<conio.h>
int tong(int n){
    int i=0,s=2,a=1,b=1,temp;
    for(i=3;i<=n;i++){
        temp=a+b;
        a=b;
        b=temp;
        s+=b;
    }
    return s;
}
int main(){
    int n;
    printf("n= ");scanf("%d",&n);
    printf("Sum = %d",tong(n));
    getch();
    return 0;
}
